﻿@model MusicOnLine.Models.AlbumUploadModel

@{
    ViewBag.Title = "UploadTest";
}

<h2>UploadTest</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>AlbumUploadModel</legend>
        <div>@Model.AlbumName</div>
        <div class="editor-label">
            @Html.LabelFor(model => model.AlbumName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.AlbumName)
            @Html.ValidationMessageFor(model => model.AlbumName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.AlbumArtist)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.AlbumArtist)
            @Html.ValidationMessageFor(model => model.AlbumArtist)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.PublishDate)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.PublishDate)
            @Html.ValidationMessageFor(model => model.PublishDate)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Year)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Year)
            @Html.ValidationMessageFor(model => model.Year)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.AlbumTitle)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.AlbumTitle)
            @Html.ValidationMessageFor(model => model.AlbumTitle)
        </div>

        @foreach (var i in Model.SongList)
        {             
            <div class="editor-field">
            @Html.EditorFor(o=>i.Artist)            
            </div>
        }
        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
